package com.foreknow.dao;

import com.foreknow.model.Guestbook;

import java.sql.SQLException;
import java.util.List;

public interface GuestbookDao {
    /**
     * 查询Guestbook
     * @param guestbook
     * @return
     */
    public List<Object> query();

    /**
     * 添加方法
     * @param guestbook
     * @return
     */
    public boolean add (Guestbook guestbook) throws SQLException;

    /**
     * 删除方法
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean delete(int id) throws SQLException;

    /**
     * 通过id修改
     * @param guestbook
     * @return
     * @throws SQLException
     */
    public  boolean update(Guestbook guestbook)throws  SQLException;

    /**
     * 根据id查询
     * @param id
     * @return
     * @throws SQLException
     */
    public Guestbook Idquery(int id) ;

    /**
     * 练习修改方法
     * @param guestbook
     * @return
     * @throws SQLException
     */
    public boolean updates(Guestbook guestbook)throws SQLException;
}
